// SPDX-License-Identifier: MIT
// Copyright (C) 2018-present iced project and contributors

#if ENCODER && OPCODE_INFO && MVEX
using System;
using System.Collections.Generic;
using Iced.Intel;

namespace Iced.UnitTests.Intel {
	static partial class ToEnumConverter {
		public static bool TryMvexConvFn(string value, out MvexConvFn mvexConvFn) => mvexConvFnDict.TryGetValue(value, out mvexConvFn);
		public static MvexConvFn GetMvexConvFn(string value) => TryMvexConvFn(value, out var mvexConvFn) ? mvexConvFn : throw new InvalidOperationException($"Invalid MvexConvFn value: {value}");

		static readonly Dictionary<string, MvexConvFn> mvexConvFnDict =
			// GENERATOR-BEGIN: MvexConvFnHash
			// ⚠️This was generated by GENERATOR!🦹‍♂️
			new Dictionary<string, MvexConvFn>(13, StringComparer.Ordinal) {
				{ "None", MvexConvFn.None },
				{ "Sf32", MvexConvFn.Sf32 },
				{ "Sf64", MvexConvFn.Sf64 },
				{ "Si32", MvexConvFn.Si32 },
				{ "Si64", MvexConvFn.Si64 },
				{ "Uf32", MvexConvFn.Uf32 },
				{ "Uf64", MvexConvFn.Uf64 },
				{ "Ui32", MvexConvFn.Ui32 },
				{ "Ui64", MvexConvFn.Ui64 },
				{ "Df32", MvexConvFn.Df32 },
				{ "Df64", MvexConvFn.Df64 },
				{ "Di32", MvexConvFn.Di32 },
				{ "Di64", MvexConvFn.Di64 },
			};
			// GENERATOR-END: MvexConvFnHash
	}
}
#endif
